<?php
namespace app\index\controller\user;
use app\index\model\UsersLogs;
class Logs extends \app\index\controller\user\BaseUser{ 
    public function index(){
        //实例化用户登录日志的类
        $users_logs = new UsersLogs();
        $rows = $users_logs->where('users_id',$this->userdata->id)
                              ->order('id', 'desc')
                              ->paginate(5);
        //把用户信息传递给模板
        $data = [];
        $data['rows'] = $rows;
        return view('user/logs',$data);
    }
}
